package com.contactbook.web.client.service;

import java.util.List;
import java.util.Set;

import com.contactbook.web.client.dto.ContactDTO;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;


@RemoteServiceRelativePath("contact")
public interface ContactService extends RemoteService {
	
	public void login(String login, String password);
	public void logout();
	
	public ContactDTO add(ContactDTO contact, int groupId, String login, String password);
	public ContactDTO add(ContactDTO contact, String login, String password);
	public void update(ContactDTO contact, String login, String password);
	public void delete(int contactId, String login, String password);
	
	public ContactDTO getContactById(int contactId, String login, String password);
	public List<ContactDTO> getContactsByName(String firstName, String lastName, String login, String password);
	public Set<ContactDTO> getContacts(String login, String password);
	public Set<ContactDTO> getContacts(int groupId, String login, String password);
	public Set<ContactDTO> getContactsWithoutGroup(String login, String password);
}
